﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using PSDLib.Models;

namespace PSDLib.Ctrl
{
    public partial class DownloadProgress : UserControl
    {
        public delegate void RetryEventHandler(DownloadProgress progress, dl_files file);
        public event RetryEventHandler OnRetry;

        public dl_files FileInfo { get; set; }
        public DownloadProgress()
        {
            InitializeComponent();
        }

        private void btnRedo_Click(object sender, EventArgs e)
        {
            OnRetry?.Invoke(this, FileInfo);
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Parent.Controls.Remove(this);
        }
    }
}
